@rowHeight: 24px;
@maxCount: 3;
@maxHeight: @rowHeight * @maxCount + 4px * (@maxCount + 1) + 2px;

.text-ell-mixin() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}

.strong-search {
  display: inline-flex;
  flex: 1;
  min-width: 360px;
  max-height: @maxHeight;
  border: 1px solid;
  border-color: var(--color-border-3);
  border-radius: 2px;
  box-sizing: border-box;
  // transition: var(--el-transition-border);

  .arco-popover-popup-arrow {
    left: 20px !important;
  }
  .filter-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    img {
      width: 16px;
      height: 16px;
    }
  }

  .search-scrollbar {
    flex: 1;
    position: relative;
    overflow: visible;
    // max-width: calc(100% - 16px - 8px);
    height: 100%;
    .arco-scrollbar-container {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      padding: 3px 6px;
      max-height: @maxHeight - 2px;
      flex-wrap: wrap;
      gap: 4px;
    }
  }

  .search-input {
    width: max-content;
    flex: 1;
    padding: 0;
    height: @rowHeight;
    flex-basis: 20%;
    font-size: 14px;
    border: none;
    line-height: @rowHeight;
    box-shadow: none;
    position: relative;
    background-color: white;

    &::before {
      content: var(data-current);
    }
    &.arco-input-focus {
      background-color: transparent;
    }
    &:hover {
      background-color: transparent;
    }
    .arco-input {
      height: @rowHeight;
      line-height: @rowHeight;
    }

    // .el-input__prefix-inner {
    //   padding-right: 4px;
    //   color: #323538;
    // }

    .arco-input-suffix {
      column-gap: 6px;
      & > :first-child {
        margin-left: 6px;
      }
      .e-icon {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 18px;
        height: 18px;
        cursor: pointer;
        img {
          width: 100%;
          height: 100%;
        }
      }
    }
  }

  .tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0 4px 0 8px;
    width: auto;
    max-width: 100%;
    height: @rowHeight;
    font-size: 14px;
    white-space: nowrap;
    background-color: #f3f4f7;
    font-weight: 400;
    border-radius: 2px;

    line-height: 1;

    .tag-content {
      height: 100%;
      line-height: @rowHeight;
      display: flex;
      max-width: calc(100% - 4px - 14px);
    }

    .tag-prefix {
      margin-right: 4px;
      color: #323538;
    }

    .tag-value {
      .text-ell-mixin();
      color: #323538;
      flex: 1;
    }

    .close-btn {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      margin-left: 4px;
      width: 14px;
      height: 14px;
      font-size: 6px;
      color: #a6adb8;
      cursor: pointer;
      border-radius: 2px;
      &:hover {
        color: #323538;
        background: rgba(31, 35, 41, 0.08);
      }
    }
  }

  &:hover {
    border-color: #c0c4cc;
  }

  &.active {
    border-color: rgb(var(--primary-5));
    .search-input {
      box-shadow: none;
      &.is-focus {
        box-shadow: none;
      }
    }
  }
}
.search-popover {
  padding: 0;
  width: 180px;
  color: #323538;
  .arco-popover-title {
    margin-top: 8px;
    margin-left: 12px;
  }
  .filter-list {
    .filter-title {
      margin-top: 8px;
      margin-left: 12px;
      color: #8a8e99;
      font-weight: 700;
    }

    .filter-content {
      font-size: 14px;
      font-weight: 400;
      margin-top: 8px;
      .filter-item {
        cursor: pointer;
        padding: 8px 12px;
        .text-ell-mixin();
        line-height: 16px;
        &.active {
          // color: rgb(var(--primary-5));
          background-color: var(--color-fill-2);
        }
      }
    }
  }

  .search-select {
    font-size: 14px;
    font-weight: 400;
    .search-option {
      cursor: pointer;
      padding: 8px 12px;
      .text-ell-mixin();
      line-height: 16px;
      &.active {
        color: rgb(var(--primary-5));
        background-color: var(--color-fill-2);
      }
    }
  }

  .search-check {
    .check-option {
      line-height: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 12px;
      width: 100%;
      cursor: pointer;
      &.active {
        color: rgb(var(--primary-5));
        background-color: var(--color-fill-2);
      }
    }

    .check-label {
      font-size: 14px;
      font-weight: 400;
      .text-ell-mixin();
      flex: 1;
    }

    .check-icon {
      margin-left: 10px;
      width: 16px;
      height: 16px;
    }
  }

  .search-date {
    .date-title {
      margin-top: 8px;
      margin-left: 8px;
      font-size: 14px;
      color: #8a8e99;
      font-weight: 700;
    }
    .tip-title {
      margin-bottom: 4px;
      font-size: 14px;
      color:#393C40;
    }

    .date-content {
      padding: 8px 12px;
      .date-start {
        margin-bottom: 10px;
      }
      .date-end {
        margin-bottom: 2px;
      }

      .arco-picker {
        padding-right: 12px;
        padding-left: 8px;
        width: 100%;
        input {
          font-size: 14px;
        }
        .arco-picker-suffix {
          display: none;
        }
        .arco-picker-prefix {
          padding: 0;
          width: 16px;
          height: 16px;
        }
      }
    }
  }

  .search-popover-footer {
    display: flex;
    justify-content: center;
    column-gap: 24px;
    padding: 8px 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
  }
}
